<?php
$userid = islogin('callback');
$oCart = new Cart();
$r = $oCart->add_to_cart($userid, $_POST);	// 加入购物车
if($r['result'] == 'succ'){
	ajax_msg('succ', '', 'callback_add2cart', '<script type="text/javascript">set_cookie("cart_num", "", -1);</script>');
}
ajax_msg($r['result'], $r['rmsg'], 'callback_add2cart');
?>